package com.slz3.business.module.wmsManagement.wmsPurchaseOrderSelf.steward;

import com.slz3.business.frame.response.RR;
import com.slz3.business.frame.response.ResInfo;
import com.slz3.business.module.wmsManagement.wmsPurchaseOrderSelf.domain.WmsPurchaseOrderSelf;
import com.slz3.business.module.wmsManagement.wmsPurchaseOrderSelf.domain.WmsPurchaseOrderSelfCondition;
import com.slz3.business.module.wmsManagement.wmsPurchaseOrderSelf.req.AddForm;
import com.slz3.business.module.wmsManagement.wmsPurchaseOrderSelf.req.UpdateForm;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;

public class WmsPurchaseOrderSelfResAtomic extends WmsPurchaseOrderSelfResExecutor {

    public Mono<ServerResponse> add_$WmsPurchaseOrderSelfUpdateLock(ServerRequest req, AddForm form) {
        return super.add(req, form);
    }

    public Mono<ServerResponse> delete_$WmsPurchaseOrderSelfUpdateLock(ServerRequest req, WmsPurchaseOrderSelfCondition wmsPurchaseOrderSelfCondition) {
        return WmsPurchaseOrderSelfResSafeValid.delete(req, wmsPurchaseOrderSelfCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.delete(req);
    }

    public Mono<ServerResponse> modify_$WmsPurchaseOrderSelfUpdateLock(ServerRequest req, UpdateForm form) {
        return super.modify(req, form);
    }

    public Mono<ServerResponse> info_$WmsPurchaseOrderSelfUpdateLock(ServerRequest req) {
        return WmsPurchaseOrderSelfResSafeValid.info(req) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.info(req);
    }

    public Mono<ServerResponse> auditSubmit_$WmsPurchaseOrderSelfUpdateLock(ServerRequest req, WmsPurchaseOrderSelfCondition wmsPurchaseOrderSelfCondition) {
        return WmsPurchaseOrderSelfResSafeValid.auditSubmit(req, wmsPurchaseOrderSelfCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.auditSubmit(req);
    }

    public Mono<ServerResponse> audit_$WmsPurchaseOrderSelfUpdateLock(ServerRequest req, WmsPurchaseOrderSelfCondition wmsPurchaseOrderSelfCondition) {
        return WmsPurchaseOrderSelfResSafeValid.audit(req, wmsPurchaseOrderSelfCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.audit(req);
    }

    public Mono<ServerResponse> auditReject_$WmsPurchaseOrderSelfUpdateLock(ServerRequest req, WmsPurchaseOrderSelfCondition wmsPurchaseOrderSelfCondition) {
        return WmsPurchaseOrderSelfResSafeValid.auditReject(req, wmsPurchaseOrderSelfCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.auditReject(req);
    }


    public Mono<ServerResponse> usingEnable_$WmsPurchaseOrderSelfUpdateLock(ServerRequest req, WmsPurchaseOrderSelfCondition wmsPurchaseOrderSelfCondition) {
        return WmsPurchaseOrderSelfResSafeValid.usingEnable(req, wmsPurchaseOrderSelfCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.usingEnable(req);
    }

    public Mono<ServerResponse> usingDisable_$WmsPurchaseOrderSelfUpdateLock(ServerRequest req, WmsPurchaseOrderSelfCondition wmsPurchaseOrderSelfCondition) {
        return WmsPurchaseOrderSelfResSafeValid.usingDisable(req, wmsPurchaseOrderSelfCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.usingDisable(req);
    }
}
